# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=ropr
pkgver=0.2.25
pkgrel=1
pkgdesc='Blazing fast multithreaded ROP Gadget finder'
url='https://github.com/Ben-Lichtman/ropr'
arch=('loong64' 'x86_64')
license=('Apache')
depends=('glibc' 'gcc-libs')
makedepends=('cargo')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('f2c514a097ed2521d4b35a254536b04daa09f176afc0b18d6b6e69820c994e6164d17e16729bf1488b3c16219b104c0d1979c6c048b76e0ad8c052671c0c6f71')
b2sums=('ec310361d07237acf1ddadc4d27923f3329d370bb02a69c01628d5888c0dac94b77d6239f3ee1dab3c61d807064c823699b2fd6a73d6c49f103819209acb72a2')

build() {
  cd ${pkgname}-${pkgver}
  cargo build --release --locked
}

check() {
  cd ${pkgname}-${pkgver}
  cargo test --release --locked
}

package() {
  cd ${pkgname}-${pkgver}
  install -Dm 755 target/release/ropr -t "${pkgdir}/usr/bin"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
